/*
Navicat MySQL Data Transfer

Source Server         : 本地
Source Server Version : 50621
Source Host           : localhost:3306
Source Database       : guns

Target Server Type    : MYSQL
Target Server Version : 50621
File Encoding         : 65001

Date: 2017-12-10 11:34:35
*/

DROP DATABASE IF EXISTS crm_flowable;
CREATE DATABASE IF NOT EXISTS crm_flowable DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

DROP DATABASE IF EXISTS crm;
CREATE DATABASE IF NOT EXISTS crm DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

USE crm;

SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `crm_customer_company`;
CREATE TABLE `crm_customer_company` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '企业编号',
  `name` varchar(255) NOT NULL COMMENT '企业名称',
  `unified_social_credit_code` char(18) NOT NULL  COMMENT '统一社会信用代码',
  `short_name` varchar(255) NOT NULL COMMENT '企业简称',
  `legal_person` varchar(255) NOT NULL COMMENT '法定代表人',
  `corporation` varchar(255) NOT NULL COMMENT '所属集团',
  `section` varchar(255) NOT NULL COMMENT '所属板块',
  `military_code` varchar(255) NOT NULL  COMMENT '军工代码',
  `area_id` int(11) NOT NULL COMMENT '所属区域',
  `main_business` varchar(255) NOT NULL COMMENT '主营业务或产品',
  `delete_flag` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COMMENT='企业客户';

-- ----------------------------
-- Records of crm_customer_company
-- ----------------------------


-- ----------------------------
--  Table structure for `crm_customer_relation`
-- ----------------------------
DROP TABLE IF EXISTS `crm_customer_relation`;
CREATE TABLE `crm_customer_relation` (
  `main_customer_id` int(11) NOT NULL,
  `sub_customer_id` int(11) NOT NULL,
  primary key (`main_customer_id`,`sub_customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='客户关联表';

-- ----------------------------
--  Table structure for `crm_customer_company_manage`
-- ----------------------------
DROP TABLE IF EXISTS `crm_customer_company_manage`;
CREATE TABLE `crm_customer_company_manage` (
  `customer_company_id` int(11) NOT NULL COMMENT '客户id',
  `customer_type_code` varchar(255) NOT NULL COMMENT '客户类型',
  `annual_income` decimal(30,4)  COMMENT '年销售收入规模（万元）',
  `customer_num` int(11)  COMMENT '客户数量',
  `annual_purchase_amount` decimal(30,4)  COMMENT '年度采购规模',
  `provider_num` int(11) unsigned COMMENT '供应商数量',
  `depart_id` int(11) unsigned NOT NULL COMMENT '所属部门',
  `salesman_id` int(11) NOT NULL COMMENT '所属销售',
  `source` varchar(255) COMMENT '信息来源',
  `is_ccb` char(2)  COMMENT '是否建行账户',
  `is_plan_to_open_account` char(2)  COMMENT '是否计划开户',
  `state` varchar(255)  COMMENT '当前状态',
  `delete_flag` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  PRIMARY KEY (`customer_company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='业务管理';

-- ----------------------------
--  Records of `crm_customer_company_manage`
-- ----------------------------


-- ----------------------------
--  Table structure for `crm_contact`
-- ----------------------------
DROP TABLE IF EXISTS `crm_contact`;
CREATE TABLE `crm_contact` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL COMMENT '姓名',
  `customer_company_id` int(11) NOT NULL COMMENT '企业id',
  `depart_name` varchar(255) DEFAULT NULL COMMENT '部门名称',
  `post` varchar(255) DEFAULT NULL COMMENT '岗位职务',
  `mobile_num` char(11)  NOT NULL COMMENT '手机号',
  `standby_mobile_num` char(11)  DEFAULT NULL COMMENT '备用手机号',
  `landline` varchar(255) DEFAULT NULL COMMENT '办公电话',
  `facsimile` varchar(255) DEFAULT NULL COMMENT '传真',
  `email` varchar(255) DEFAULT NULL COMMENT '电子邮箱',
  `wechat` varchar(255) DEFAULT NULL COMMENT '微信号',
  `qq` bigint(12) unsigned DEFAULT NULL COMMENT 'QQ',
  `attitude` varchar (255) DEFAULT NULL COMMENT '态度',
  `remark` text COMMENT '备注',
  `delete_flag` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='联系人';




-- ----------------------------
-- Table structure for crm_sale
-- ----------------------------
DROP TABLE IF EXISTS `crm_sale`;
CREATE TABLE `crm_sale` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `customer_company_id` int(11) unsigned NOT NULL COMMENT '企业id',
  `year` int(4) unsigned NOT NULL COMMENT '年度',
  `customer_name` varchar(255) NOT NULL COMMENT '客户名称',
  `product` varchar(255) NOT NULL COMMENT '供应产品',
  `annual_supply` decimal(30,4) NOT NULL DEFAULT '0.000000000' COMMENT '年供应量金额',
  `account_receivable_balance` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '应收账款余额',
  `credit_balance` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '挂账余额',
  `cash_receipted` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '现金收款量',
  `silver_ticket_recivied` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '银票收款量',
  `business_ticket_recivied` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '商票收款量',
  `period` int(11) NOT NULL DEFAULT '0' COMMENT ' 一般期限 ',
  `business_ticket_discount` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '商票贴现量',
  `discount_Interest_rate` decimal(30,4) NOT NULL DEFAULT '0' COMMENT '贴现利率',
  `delete_flag` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  PRIMARY KEY (`id`,`year`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='销售配套';




-- ----------------------------
-- Table structure for crm_purchase
-- ----------------------------
DROP TABLE IF EXISTS `crm_purchase`;
CREATE TABLE `crm_purchase` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_company_id` int(11) unsigned NOT NULL COMMENT '客户id',
  `year` int(4) NOT NULL COMMENT '年度',
  `provider_name` varchar(255) NOT NULL COMMENT '供应商名称',
  `product` varchar(255) NOT NULL COMMENT '采购商品',
  `annual_purchase_amount` decimal(30,4) NOT NULL COMMENT '年度采购金额',
  `account_payable_balance` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '应付账款余额',
  `cash_paid` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '现金付款量',
  `silver_ticket_paid` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '银票付款量',
  `business_ticket_paid` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '商票付款量',
  `period` int(11) NOT NULL DEFAULT '0' COMMENT '一般期限',
  `business_ticket_discount` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '商票贴现量',
  `discount_Interest_rate` decimal(30,4) NOT NULL DEFAULT '0' COMMENT '贴现利率',
  `provider_product_balance` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '供应商供货余额',
  `delete_flag` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='采购配套';

-- ----------------------------
-- Table structure for crm_pay_plan
-- ----------------------------
DROP TABLE IF EXISTS `crm_pay_plan`;
CREATE TABLE `crm_pay_plan` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `month` char(7) NOT NULL COMMENT '月份',
  `customer_company_id` int(11) NOT NULL COMMENT '客户企业id',
  `provider_name` varchar(255) NOT NULL COMMENT '供应商名称',
  `pay_amount` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '付款金额',
  `crash` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '现金',
  `silver_ticket` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '银票',
  `silver_ticket_period` int(11) NOT NULL DEFAULT '0' COMMENT '银票期限',
  `business_ticket` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '商票',
  `business_ticket_period` int(11) NOT NULL DEFAULT '0' COMMENT '商票期限',
  `hangxin` decimal(30,4) NOT NULL DEFAULT '0.0000' COMMENT '航信',
  `hangxin_period` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '航信期限',
  `delete_flag` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='付款计划';

-- ----------------------------
--  Table structure for `crm_visit`
-- ----------------------------
DROP TABLE IF EXISTS `crm_visit`;
CREATE TABLE `crm_visit` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customer_company_id` int(11) DEFAULT NULL COMMENT '企业名称',
  `visit_date` date DEFAULT NULL COMMENT '拜访日',
  `begin_time` char(8) DEFAULT NULL COMMENT '开始时间',
  `end_time` char(8) DEFAULT NULL COMMENT '结束时间',
  `place` varchar(255) NOT NULL COMMENT '地点',
  `form` varchar(255) DEFAULT NULL COMMENT '形式',
  `visitor_id` int(11) DEFAULT NULL COMMENT '乙方人员',
  `visitor_name` varchar(255) DEFAULT NULL COMMENT '乙方人员',
  `entourage` varchar(255) DEFAULT NULL COMMENT '随访人员',
  `target` varchar(255) DEFAULT NULL COMMENT '拜访目的',
  `target_person` varchar(255) DEFAULT NULL COMMENT '拜访对象',
  `summary` text NOT NULL COMMENT '拜访纪要',
  `next_step` text NOT NULL COMMENT '下一步措施',
  `challenges_and_opportunities` text NOT NULL COMMENT '主要机会和存在问题',
  `feedback` char(2) NOT NULL DEFAULT '-1' COMMENT '产品反馈',
  `creator_name` varchar(255) NOT NULL COMMENT '创建者',
  `creator_id` int(11) NOT NULL COMMENT '创建者id',
  `delete_flag` int(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='拜访记录';

DROP TABLE IF EXISTS `crm_visit_pic`;
CREATE TABLE `crm_visit_pic` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `visit_id` int(11) DEFAULT NULL COMMENT '',
  `url` varchar(500) DEFAULT NULL COMMENT '地址',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='拜访记录';


-- ----------------------------
--  Table structure for `crm_area`
-- ----------------------------
DROP TABLE IF EXISTS `crm_area`;
CREATE TABLE `crm_area` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL unique COMMENT '名称',
  `pid` int(11) NOT NULL COMMENT '父节点',
  `pids` varchar(255) NOT NULL COMMENT '父节点们',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='区域';


-- ----------------------------
-- Records of crm_area
-- ----------------------------
INSERT INTO `crm_area` VALUES ('2', '华北', '0', '[0],');
INSERT INTO `crm_area` VALUES ('3', '河北省', '2', '[0],[2],');
INSERT INTO `crm_area` VALUES ('4', '石家庄', '3', '[0],[2],[3],');


-- ----------------------------
--  Table structure for `crm_article`
-- ----------------------------
DROP TABLE IF EXISTS `crm_article`;
CREATE TABLE `crm_article` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pic` varchar(255) NOT NULL COMMENT '图片',
  `title` varchar(255) NOT NULL COMMENT '标题',
  `type_code` VARCHAR(255) NOT NULL COMMENT '分类',
  `release_time` datetime NOT NULL COMMENT '发布时间',
  `url` varchar(255) NOT NULL COMMENT '链接',
  `content` text NOT NULL COMMENT '内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文章';

-- ----------------------------
--  Table structure for `crm_qa`
-- ----------------------------
DROP TABLE IF EXISTS `crm_qa`;
CREATE TABLE `crm_qa` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `question` varchar(255) NOT NULL COMMENT '问题',
  `answer` text NOT NULL COMMENT '答案',
  `type_code` VARCHAR(255) NOT NULL COMMENT '分类',
  `create_time` datetime NOT NULL COMMENT '时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='问题';


-- ----------------------------
--  Table structure for `crm_pic`
-- ----------------------------
DROP TABLE IF EXISTS `crm_pic`;
CREATE TABLE `crm_pic` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL COMMENT '标题',
  `pic` varchar(255) NOT NULL COMMENT '图片',
  `type_code` VARCHAR(255) NOT NULL COMMENT '分类',
  `create_date` datetime NOT NULL COMMENT '时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='图片';


-- ----------------------------
--  Table structure for `sys_dept`
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `num` int(11) DEFAULT NULL COMMENT '排序',
  `pid` int(11) DEFAULT NULL COMMENT '父部门id',
  `pids` varchar(255) DEFAULT NULL COMMENT '父级ids',
  `simplename` varchar(45) DEFAULT NULL COMMENT '简称',
  `fullname` varchar(255) DEFAULT NULL unique COMMENT '全称',
  `tips` varchar(255) DEFAULT NULL COMMENT '提示',
  `version` int(11) DEFAULT NULL COMMENT '版本（乐观锁保留字段）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 COMMENT='部门表';

-- ----------------------------
--  Records of `sys_dept`
-- ----------------------------
BEGIN;
INSERT INTO `sys_dept` VALUES ('1', '100000000', '0', '[0],', '金网络', '金网络（北京）电子商务有限公司', null, null),
  ('2', '100000000', '1', '[0],[1],', '运营部', '运营部', null, null),
  ('3', '99999000', '1', '[0],[1],', '技术部', '技术部', null, null),
  ('4', '99998000', '1', '[0],[1],', 'CRM开发测试组', 'CRM开发测试组', null, null),
  ('5', '99997000', '1', '[0],[1],', '产品部', '产品部', null, null);
COMMIT;


-- ----------------------------
-- Table structure for sys_dict
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `num` char(30) DEFAULT NULL COMMENT '编码',
  `pid` int(11) DEFAULT NULL COMMENT '父级字典',
  `name` varchar(255) DEFAULT NULL  COMMENT '名称',
  `tips` varchar(255) DEFAULT NULL COMMENT '提示',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8 COMMENT='字典表';

-- ----------------------------
-- Records of sys_dict
-- ----------------------------
BEGIN;
INSERT INTO `sys_dict` VALUES ('29', 'sex', '0', '性别', null),
  ('30', '1', '29', '男', null),
  ('31', '2', '29', '女', null),
  ('57', 'status', '0', '状态', null),
  ('58', '1', '57', '启用', null),
  ('59', '2', '57', '禁用', null),
  ('60', 'account_status', '0', '账号状态', null),
  ('61', '1', '60', '启用', null),
  ('62', '2', '60', '冻结', null),
  ('63', '3', '60', '已删除', null),
  ('66', 'customer_type', '0', '客户类型', null),
  ('67', '1', '66', '核心企业', null),
  ('68', '2', '66', '重点供应商', null),
  ('69', '3', '66', '一般供应商', null),
  ('76', 'info_source', '0', '信息来源', null),
  ('77', '航发商城', '76', '航发商城', null),
  ('78', '采购企业通知', '76', '采购企业通知', null),
  ('79', '友商推荐', '76', '友商推荐', null),
  ('80', '直销', '76', '直销', null),
  ('81', '其他', '76', '其他', null),
  ('82', 'info_sources', '0', '所属集团', null),
  ('83', '航空', '82', '航空', null),
  ('84', '航发', '82', '航发', null),
  ('85', '其他', '82', '其他', null),
  ('86', 'verbalType', '0', '话术类型', null),
  ('87', '1', '86', '航信注册', null),
  ('88', '2', '86', '企业认证', null),
  ('89', '3', '86', '融资', null),
  ('90', '4', '86', '航信流转', null),
  ('91', '5', '86', '航信清分', null),
  ('92', '6', '86', '核心企业', null),
  ('93', '7', '86', '供应商', null),
  ('94', 'visitForm', '0', ' 拜访形式', null),
  ('95', '电话', '94', '电话', null),
  ('96', '现场', '94', '现场', null),
  ('97', '正式会议', '94', '正式会议', null),
  ('98', 'yesOrNo', '0', '是否', null),
  ('99', '-1', '98', '否', null),
  ('100', '1', '98', '是', null);


-- ----------------------------
-- Table structure for sys_expense
-- ----------------------------
DROP TABLE IF EXISTS `sys_expense`;
CREATE TABLE `sys_expense` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `money` decimal(30,4) DEFAULT NULL COMMENT '报销金额',
  `desc` varchar(255) DEFAULT '' COMMENT '描述',
  `createtime` datetime,
  `state` int(11) DEFAULT NULL COMMENT '状态: 1.待提交  2:待审核   3.审核通过 4:驳回',
  `userid` int(11) DEFAULT NULL COMMENT '用户id',
  `processId` varchar(255) DEFAULT NULL COMMENT '流程定义id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COMMENT='报销表';

-- ----------------------------
-- Records of sys_expense
-- ----------------------------

-- ----------------------------
-- Table structure for sys_login_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_login_log`;
CREATE TABLE `sys_login_log` (
  `id` int(65) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `logname` varchar(255) DEFAULT NULL COMMENT '日志名称',
  `userid` INT(11) DEFAULT NULL COMMENT '管理员id',
  `createtime` datetime DEFAULT NULL COMMENT '创建时间',
  `succeed` varchar(255) DEFAULT NULL COMMENT '是否执行成功',
  `message` text COMMENT '具体消息',
  `ip` varchar(255) DEFAULT NULL COMMENT '登录ip',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=216 DEFAULT CHARSET=utf8 COMMENT='登录记录';

-- ----------------------------
-- Records of sys_login_log
-- ----------------------------

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `code` varchar(255) DEFAULT NULL COMMENT '菜单编号',
  `pcode` varchar(255) DEFAULT NULL COMMENT '菜单父编号',
  `pcodes` varchar(255) DEFAULT NULL COMMENT '当前菜单的所有父菜单编号',
  `name` varchar(255) DEFAULT NULL COMMENT '菜单名称',
  `icon` varchar(255) DEFAULT NULL COMMENT '菜单图标',
  `url` varchar(255) DEFAULT NULL COMMENT 'url地址',
  `num` int(65) DEFAULT NULL COMMENT '菜单排序号',
  `levels` int(65) DEFAULT NULL COMMENT '菜单层级',
  `ismenu` int(11) DEFAULT NULL COMMENT '是否是菜单（1：是  0：不是）',
  `tips` varchar(255) DEFAULT NULL COMMENT '备注',
  `status` int(65) DEFAULT NULL COMMENT '菜单状态 :  1:启用   0:不启用',
  `isopen` int(11) DEFAULT NULL COMMENT '是否打开:    1:打开   0:不打开',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=171 DEFAULT CHARSET=utf8 COMMENT='菜单表';

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES ('105', 'system', '0', '[0],', '系统管理', 'fa-user', '#', '1000', '1', '1', null, '1', '1'),
  ('106', 'mgr', 'system', '[0],[system],', '用户管理', '', '/mgr', '1', '2', '1', null, '1', '0'),
  ('107', 'mgr_add', 'mgr', '[0],[system],[mgr],', '添加用户', null, '/mgr/add', '1', '3', '0', null, '1', '0'),
  ('108', 'mgr_edit', 'mgr', '[0],[system],[mgr],', '修改用户', null, '/mgr/edit', '2', '3', '0', null, '1', '0'),
  ('109', 'mgr_delete', 'mgr', '[0],[system],[mgr],', '删除用户', null, '/mgr/delete', '3', '3', '0', null, '1', '0'),
  ('110', 'mgr_reset', 'mgr', '[0],[system],[mgr],', '重置密码', null, '/mgr/reset', '4', '3', '0', null, '1', '0'),
  ('111', 'mgr_freeze', 'mgr', '[0],[system],[mgr],', '冻结用户', null, '/mgr/freeze', '5', '3', '0', null, '1', '0'),
  ('112', 'mgr_unfreeze', 'mgr', '[0],[system],[mgr],', '解除冻结用户', null, '/mgr/unfreeze', '6', '3', '0', null, '1', '0'),
  ('113', 'mgr_setRole', 'mgr', '[0],[system],[mgr],', '分配角色', null, '/mgr/setRole', '7', '3', '0', null, '1', '0'),
  ('114', 'role', 'system', '[0],[system],', '角色管理', null, '/role', '2', '2', '1', null, '1', '0'),
  ('115', 'role_add', 'role', '[0],[system],[role],', '添加角色', null, '/role/add', '1', '3', '0', null, '1', '0'),
  ('116', 'role_edit', 'role', '[0],[system],[role],', '修改角色', null, '/role/edit', '2', '3', '0', null, '1', '0'),
  ('117', 'role_remove', 'role', '[0],[system],[role],', '删除角色', null, '/role/remove', '3', '3', '0', null, '1', '0'),
  ('118', 'role_setAuthority', 'role', '[0],[system],[role],', '配置权限', null, '/role/setAuthority', '4', '3', '0', null, '1', '0'),
  ('119', 'menu', 'system', '[0],[system],', '菜单管理', null, '/menu', '4', '2', '1', null, '1', '0'),
  ('120', 'menu_add', 'menu', '[0],[system],[menu],', '添加菜单', null, '/menu/add', '1', '3', '0', null, '1', '0'),
  ('121', 'menu_edit', 'menu', '[0],[system],[menu],', '修改菜单', null, '/menu/edit', '2', '3', '0', null, '1', '0'),
  ('122', 'menu_remove', 'menu', '[0],[system],[menu],', '删除菜单', null, '/menu/remove', '3', '3', '0', null, '1', '0'),
  ('128', 'log', 'system', '[0],[system],', '业务日志', null, '/log', '6', '2', '1', null, '1', '0'),
  ('130', 'druid', 'system', '[0],[system],', '监控管理', null, '/druid', '7', '2', '1', null, '1', null),
  ('131', 'dept', 'system', '[0],[system],', '部门管理', null, '/dept', '3', '2', '1', null, '1', null),
  ('132', 'dict', 'system', '[0],[system],', '字典管理', null, '/dict', '4', '2', '1', null, '1', null),
  ('133', 'loginLog', 'system', '[0],[system],', '登录日志', null, '/loginLog', '6', '2', '1', null, '1', null),
  ('134', 'log_clean', 'log', '[0],[system],[log],', '清空日志', null, '/log/delLog', '3', '3', '0', null, '1', null),
  ('135', 'dept_add', 'dept', '[0],[system],[dept],', '添加部门', null, '/dept/add', '1', '3', '0', null, '1', null),
  ('136', 'dept_update', 'dept', '[0],[system],[dept],', '修改部门', null, '/dept/update', '1', '3', '0', null, '1', null),
  ('137', 'dept_delete', 'dept', '[0],[system],[dept],', '删除部门', null, '/dept/delete', '1', '3', '0', null, '1', null),
  ('138', 'dict_add', 'dict', '[0],[system],[dict],', '添加字典', null, '/dict/add', '1', '3', '0', null, '1', null),
  ('139', 'dict_update', 'dict', '[0],[system],[dict],', '修改字典', null, '/dict/update', '1', '3', '0', null, '1', null),
  ('140', 'dict_delete', 'dict', '[0],[system],[dict],', '删除字典', null, '/dict/delete', '1', '3', '0', null, '1', null),
  ('141', 'notice', 'system', '[0],[system],', '通知管理', null, '/notice', '9', '2', '1', null, '1', null),
  ('142', 'notice_add', 'notice', '[0],[system],[notice],', '添加通知', null, '/notice/add', '1', '3', '0', null, '1', null),
  ('143', 'notice_update', 'notice', '[0],[system],[notice],', '修改通知', null, '/notice/update', '2', '3', '0', null, '1', null),
  ('144', 'notice_delete', 'notice', '[0],[system],[notice],', '删除通知', null, '/notice/delete', '3', '3', '0', null, '1', null),
  ('145', 'hello', '0', '[0],', '通知', 'fa-rocket', '/notice/hello', '1', '1', '1', null, '1', null),
  ('148', 'code', '0', '[0],', '代码生成', 'fa-code', '/code', '3', '1', '1', null, '1', null),
  ('150', 'to_menu_edit', 'menu', '[0],[system],[menu],', '菜单编辑跳转', '', '/menu/menu_edit', '4', '3', '0', null, '1', null),
  ('151', 'menu_list', 'menu', '[0],[system],[menu],', '菜单列表', '', '/menu/list', '5', '3', '0', null, '1', null),
  ('152', 'to_dept_update', 'dept', '[0],[system],[dept],', '修改部门跳转', '', '/dept/dept_update', '4', '3', '0', null, '1', null),
  ('153', 'dept_list', 'dept', '[0],[system],[dept],', '部门列表', '', '/dept/list', '5', '3', '0', null, '1', null),
  ('154', 'dept_detail', 'dept', '[0],[system],[dept],', '部门详情', '', '/dept/detail', '6', '3', '0', null, '1', null),
  ('155', 'to_dict_edit', 'dict', '[0],[system],[dict],', '修改菜单跳转', '', '/dict/dict_edit', '4', '3', '0', null, '1', null),
  ('156', 'dict_list', 'dict', '[0],[system],[dict],', '字典列表', '', '/dict/list', '5', '3', '0', null, '1', null),
  ('157', 'dict_detail', 'dict', '[0],[system],[dict],', '字典详情', '', '/dict/detail', '6', '3', '0', null, '1', null),
  ('158', 'log_list', 'log', '[0],[system],[log],', '日志列表', '', '/log/list', '2', '3', '0', null, '1', null),
  ('159', 'log_detail', 'log', '[0],[system],[log],', '日志详情', '', '/log/detail', '3', '3', '0', null, '1', null),
  ('160', 'del_login_log', 'loginLog', '[0],[system],[loginLog],', '清空登录日志', '', '/loginLog/delLoginLog', '1', '3', '0', null, '1', null),
  ('161', 'login_log_list', 'loginLog', '[0],[system],[loginLog],', '登录日志列表', '', '/loginLog/list', '2', '3', '0', null, '1', null),
  ('162', 'to_role_edit', 'role', '[0],[system],[role],', '修改角色跳转', '', '/role/role_edit', '5', '3', '0', null, '1', null),
  ('163', 'to_role_assign', 'role', '[0],[system],[role],', '角色分配跳转', '', '/role/role_assign', '6', '3', '0', null, '1', null),
  ('164', 'role_list', 'role', '[0],[system],[role],', '角色列表', '', '/role/list', '7', '3', '0', null, '1', null),
  ('165', 'to_assign_role', 'mgr', '[0],[system],[mgr],', '分配角色跳转', '', '/mgr/role_assign', '8', '3', '0', null, '1', null),
  ('166', 'to_user_edit', 'mgr', '[0],[system],[mgr],', '编辑用户跳转', '', '/mgr/user_edit', '9', '3', '0', null, '1', null),
  ('167', 'mgr_list', 'mgr', '[0],[system],[mgr],', '用户列表', '', '/mgr/list', '10', '3', '0', null, '1', null),
  ('172', 'contact', 'customer', '[0],[customer],', '联系人', '', '/contact', '3', '2', '1', null, '1', null),
  ('173', 'customerCompany', 'customer', '[0],[customer],', '企业客户', '', '/customerCompany', '1', '2', '1', null, '1', null),
  ('174', 'customerCompanyManage', 'customer', '[0],[customer],', '业务管理', '', '/customerCompanyManage', '2', '2', '1', null, '1', null),
  ('175', 'customer', '0', '[0],', '客户管理', 'fa-user', '#', '5', '1', '1', null, '1', null),
  ('176', 'contact_add', 'contact', '[0],[customer],[contact],', '增加', null, '/contact/add', '1', '3', '0', null, '1', null),
  ('177', 'contact_delete', 'contact', '[0],[customer],[contact],', '删除', null, '/contact/delete', '2', '3', '0', null, '1', null),
  ('178', 'contact_update', 'contact', '[0],[customer],[contact],', '更新', null, '/contact/update', '3', '3', '0', null, '1', null),
  ('179', 'customerCompany_add', 'customerCompany', '[0],[customer],[customerCompany],', '增加', null, '/customerCompany/add', '1', '3', '0', null, '1', null),
  ('180', 'customerCompany_delete', 'customerCompany', '[0],[customer],[customerCompany],', '删除', null, '/customerCompany/delete', '2', '3', '0', null, '1', null),
  ('181', 'customerCompany_update', 'customerCompany', '[0],[customer],[customerCompany],', '更新', null, '/customerCompany/update', '3', '3', '0', null, '1', null),
  ('184', 'sale', 'customer', '[0],[customer],', '销售配套', '', '/sale', '4', '2', '1', null, '1', null),
  ('185', 'purchase', 'customer', '[0],[customer],', '采购配套', '', '/purchase', '5', '2', '1', null, '1', null),
  ('186', 'payPlan', 'customer', '[0],[customer],', '付款计划', '', '/payPlan', '6', '2', '1', null, '1', null),
  ('187', 'visit', 'customer', '[0],[customer],', '拜访记录', '', '/visit', '7', '2', '1', null, '1', null),
  ('188', 'sale_add', 'sale', '[0],[customer],[sale],', '增加', null, '/sale/add', '1', '3', '0', null, '1', null),
  ('189', 'sale_delete', 'sale', '[0],[customer],[sale],', '删除', null, '/sale/delete', '2', '3', '0', null, '1', null),
  ('190', 'sale_update', 'sale', '[0],[customer],[sale],', '更新', null, '/sale/update', '3', '3', '0', null, '1', null),
  ('191', 'purchase_add', 'purchase', '[0],[customer],[purchase],', '增加', null, '/purchase/add', '1', '3', '0', null, '1', null),
  ('192', 'purchase_delete', 'purchase', '[0],[customer],[purchase],', '删除', null, '/purchase/delete', '2', '3', '0', null, '1', null),
  ('193', 'purchase_update', 'purchase', '[0],[customer],[purchase],', '更新', null, '/purchase/update', '3', '3', '0', null, '1', null),
  ('194', 'payPlan_add', 'payPlan', '[0],[customer],[payPlan],', '增加', null, '/payPlan/add', '1', '3', '0', null, '1', null),
  ('195', 'payPlan_delete', 'payPlan', '[0],[customer],[payPlan],', '删除', null, '/payPlan/delete', '2', '3', '0', null, '1', null),
  ('196', 'payPlan_update', 'payPlan', '[0],[customer],[payPlan],', '更新', null, '/payPlan/update', '3', '3', '0', null, '1', null),
  ('197', 'visit_add', 'visit', '[0],[customer],[visit],', '增加', null, '/visit/add', '1', '3', '0', null, '1', null),
  ('198', 'visit_delete', 'visit', '[0],[customer],[visit],', '删除', null, '/visit/delete', '2', '3', '0', null, '1', null),
  ('199', 'visit_update', 'visit', '[0],[customer],[visit],', '更新', null, '/visit/update', '3', '3', '0', null, '1', null),
  ('200', 'area', 'customer', '[0],[customer],', '区域管理', '', '/area', '9', '2', '1', null, '1', null),
  ('201', 'area_add', 'area', '[0],[customer],[area],', '增加', null, '/area/add', '1', '3', '0', null, '1', null),
  ('202', 'area_delete', 'area', '[0],[customer],[area],', '删除', null, '/area/delete', '2', '3', '0', null, '1', null),
  ('203', 'area_update', 'area', '[0],[customer],[area],', '更新', null, '/area/update', '3', '3', '0', null, '1', null),
  ('204', 'verbal', '0', '[0],', '话术库', 'fa-user', '#', '6', '1', '1', null, '1', null),
  ('205', 'article', 'verbal', '[0],[verbal],', '文章管理', '', '/article', '1', '2', '1', null, '1', null),
  ('206', 'qa', 'verbal', '[0],[verbal],', '问题管理', '', '/qa', '2', '2', '1', null, '1', null),
  ('207', 'pic', 'verbal', '[0],[verbal],', '图片管理', '', '/pic', '3', '2', '1', null, '1', null),
  ('211', 'article_add', 'article', '[0],[verbal],[article],', '增加', null, '/article/add', '1', '3', '0', null, '1', null),
  ('212', 'article_delete', 'article', '[0],[verbal],[article],', '删除', null, '/article/delete', '2', '3', '0', null, '1', null),
  ('213', 'article_update', 'article', '[0],[verbal],[article],', '更新', null, '/article/update', '3', '3', '0', null, '1', null),
  ('214', 'article_list', 'article', '[0],[verbal],[article],', '文章列表', null, '/article/list', '4', '3', '0', null, '1', null),
  ('215', 'qa_add', 'qa', '[0],[verbal],[qa],', '增加', null, '/qa/add', '1', '3', '0', null, '1', null),
  ('216', 'qa_delete', 'qa', '[0],[verbal],[qa],', '删除', null, '/qa/delete', '2', '3', '0', null, '1', null),
  ('217', 'qa_update', 'qa', '[0],[verbal],[qa],', '更新', null, '/qa/update', '3', '3', '0', null, '1', null),
  ('218', 'qa_list', 'qa', '[0],[verbal],[qa],', '问题列表', null, '/qa/list', '4', '3', '0', null, '1', null),
  ('219', 'pic_add', 'pic', '[0],[verbal],[pic],', '增加', null, '/pic/add', '1', '3', '0', null, '1', null),
  ('220', 'pic_delete', 'pic', '[0],[verbal],[pic],', '删除', null, '/pic/delete', '2', '3', '0', null, '1', null),
  ('221', 'pic_update', 'pic', '[0],[verbal],[pic],', '更新', null, '/pic/update', '3', '3', '0', null, '1', null),
  ('222', 'pic_list', 'pic', '[0],[verbal],[pic],', '图片列表', null, '/pic/list', '4', '3', '0', null, '1', null),
  ('223', 'customerCompany_importExcel', 'customerCompany', '[0],[customer],[customerCompany],', '数据上传', '', '/customerCompany/importExcel', '4', '3', '0', null, '1', null),
  ('224', 'customerCompany_list', 'customerCompany', '[0],[customer],[customerCompany],', '客户列表', '', '/customerCompany/list', '5', '3', '0', null, '1', null),
  ('225', 'contact_importExcel', 'contact', '[0],[customer],[contact],', '数据上传', '', '/contact/importExcel', '4', '3', '0', null, '1', null),
  ('226', 'contact_list', 'contact', '[0],[customer],[contact],', '联系人列表', '', '/contact/list', '5', '3', '0', null, '1', null),
  ('227', 'sale_importExcel', 'sale', '[0],[customer],[sale],', '数据上传', '', '/sale/importExcel', '4', '3', '0', null, '1', null),
  ('228', 'sale_list', 'sale', '[0],[customer],[sale],', '销售配套列表', '', '/sale/list', '4', '3', '0', null, '1', null),
  ('229', 'purchase_importExcel', 'purchase', '[0],[customer],[purchase],', '数据上传', '', '/purchase/importExcel', '4', '3', '0', null, '1', null),
  ('230', 'purchase_list', 'purchase', '[0],[customer],[purchase],', '采购配套列表', '', '/purchase/list', '4', '3', '0', null, '1', null),
  ('231', 'payPlan_importExcel', 'payPlan', '[0],[customer],[payPlan],', '数据上传', '', '/payPlan/importExcel', '4', '3', '0', null, '1', null),
  ('232', 'payPlan_list', 'payPlan', '[0],[customer],[payPlan],', '付款计划列表', '', '/payPlan/list', '4', '3', '0', null, '1', null),
  ('233', 'visit_list', 'visit', '[0],[customer],[visit],', '拜访记录列表', '', '/visit/list', '4', '3', '0', null, '1', null),
  ('234', 'area_list', 'area', '[0],[customer],[area],', '区域列表', '', '/area_list', '4', '3', '0', null, '1', null),
  ('235', 'customerCompanyManage_add', 'customerCompanyManage', '[0],[customer],[customerCompanyManage],', '增加', null, '/customerCompanyManage/add', '1', '3', '0', null, '1', null),
  ('236', 'customerCompanyManage_delete', 'customerCompanyManage', '[0],[customer],[customerCompanyManage],', '删除', null, '/customerCompanyManage/delete', '2', '3', '0', null, '1', null),
  ('237', 'customerCompanyManage_update', 'customerCompanyManage', '[0],[customer],[customerCompanyManage],', '更新', null, '/customerCompanyManage/update', '3', '3', '0', null, '1', null);

-- ----------------------------
-- Table structure for sys_notice
-- ----------------------------
DROP TABLE IF EXISTS `sys_notice`;
CREATE TABLE `sys_notice` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(255) DEFAULT NULL COMMENT '标题',
  `type` int(11) DEFAULT NULL COMMENT '类型',
  `content` text COMMENT '内容',
  `createtime` datetime DEFAULT NULL COMMENT '创建时间',
  `creater` int(11) DEFAULT NULL COMMENT '创建人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='通知表';

-- ----------------------------
-- Records of sys_notice
-- ----------------------------
INSERT INTO `sys_notice` VALUES ('8', '你好', null, '你好', '2017-05-10 19:28:57', '1');

-- ----------------------------
-- Table structure for sys_operation_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_operation_log`;
CREATE TABLE `sys_operation_log` (
  `id` int(65) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `logtype` varchar(255) DEFAULT NULL COMMENT '日志类型',
  `logname` varchar(255) DEFAULT NULL COMMENT '日志名称',
  `userid` int(11) DEFAULT NULL COMMENT '用户id',
  `classname` varchar(255) DEFAULT NULL COMMENT '类名称',
  `method` text COMMENT '方法名称',
  `createtime` datetime DEFAULT NULL COMMENT '创建时间',
  `succeed` varchar(255) DEFAULT NULL COMMENT '是否成功',
  `message` text COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=550 DEFAULT CHARSET=utf8 COMMENT='操作日志';

-- ----------------------------
-- Records of sys_operation_log
-- ----------------------------

-- ----------------------------
-- Table structure for sys_relation
-- ----------------------------
DROP TABLE IF EXISTS `sys_relation`;
CREATE TABLE `sys_relation` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `menuid` bigint(11) DEFAULT NULL COMMENT '菜单id',
  `roleid` int(11) DEFAULT NULL COMMENT '角色id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3737 DEFAULT CHARSET=utf8 COMMENT='角色和菜单关联表';

-- ----------------------------
-- Records of sys_relation
-- ----------------------------
INSERT INTO `sys_relation` VALUES ('5257', '105', '5'),
  ('5258', '106', '5'),
  ('5259', '107', '5'),
  ('5260', '108', '5'),
  ('5261', '109', '5'),
  ('5262', '110', '5'),
  ('5263', '111', '5'),
  ('5264', '112', '5'),
  ('5265', '113', '5'),
  ('5266', '114', '5'),
  ('5267', '115', '5'),
  ('5268', '116', '5'),
  ('5269', '117', '5'),
  ('5270', '118', '5'),
  ('5271', '119', '5'),
  ('5272', '120', '5'),
  ('5273', '121', '5'),
  ('5274', '122', '5'),
  ('5275', '150', '5'),
  ('5276', '151', '5'),
  ('5277', '128', '5'),
  ('5278', '158', '5'),
  ('5279', '159', '5'),
  ('5280', '130', '5'),
  ('5281', '131', '5'),
  ('5282', '153', '5'),
  ('5283', '154', '5'),
  ('5284', '132', '5'),
  ('5285', '156', '5'),
  ('5286', '157', '5'),
  ('5287', '133', '5'),
  ('5288', '161', '5'),
  ('5289', '145', '5'),
  ('5290', '175', '5'),
  ('5291', '172', '5'),
  ('5292', '226', '5'),
  ('5293', '173', '5'),
  ('5294', '224', '5'),
  ('5295', '174', '5'),
  ('5296', '184', '5'),
  ('5297', '228', '5'),
  ('5298', '185', '5'),
  ('5299', '230', '5'),
  ('5300', '186', '5'),
  ('5301', '232', '5'),
  ('5302', '187', '5'),
  ('5303', '233', '5'),
  ('5304', '200', '5'),
  ('5305', '234', '5'),
  ('5306', '204', '5'),
  ('5307', '205', '5'),
  ('5308', '214', '5'),
  ('5309', '206', '5'),
  ('5310', '218', '5'),
  ('5311', '207', '5'),
  ('5312', '222', '5'),
  ('5540', '105', '1'),
  ('5541', '106', '1'),
  ('5542', '107', '1'),
  ('5543', '108', '1'),
  ('5544', '109', '1'),
  ('5545', '110', '1'),
  ('5546', '111', '1'),
  ('5547', '112', '1'),
  ('5548', '113', '1'),
  ('5549', '165', '1'),
  ('5550', '166', '1'),
  ('5551', '167', '1'),
  ('5552', '114', '1'),
  ('5553', '115', '1'),
  ('5554', '116', '1'),
  ('5555', '117', '1'),
  ('5556', '118', '1'),
  ('5557', '162', '1'),
  ('5558', '163', '1'),
  ('5559', '164', '1'),
  ('5560', '119', '1'),
  ('5561', '120', '1'),
  ('5562', '121', '1'),
  ('5563', '122', '1'),
  ('5564', '150', '1'),
  ('5565', '151', '1'),
  ('5566', '128', '1'),
  ('5567', '134', '1'),
  ('5568', '158', '1'),
  ('5569', '159', '1'),
  ('5570', '130', '1'),
  ('5571', '131', '1'),
  ('5572', '135', '1'),
  ('5573', '136', '1'),
  ('5574', '137', '1'),
  ('5575', '152', '1'),
  ('5576', '153', '1'),
  ('5577', '154', '1'),
  ('5578', '132', '1'),
  ('5579', '138', '1'),
  ('5580', '139', '1'),
  ('5581', '140', '1'),
  ('5582', '155', '1'),
  ('5583', '156', '1'),
  ('5584', '157', '1'),
  ('5585', '133', '1'),
  ('5586', '160', '1'),
  ('5587', '161', '1'),
  ('5588', '141', '1'),
  ('5589', '142', '1'),
  ('5590', '143', '1'),
  ('5591', '144', '1'),
  ('5592', '145', '1'),
  ('5593', '175', '1'),
  ('5594', '172', '1'),
  ('5595', '176', '1'),
  ('5596', '177', '1'),
  ('5597', '178', '1'),
  ('5598', '225', '1'),
  ('5599', '226', '1'),
  ('5600', '173', '1'),
  ('5601', '179', '1'),
  ('5602', '180', '1'),
  ('5603', '181', '1'),
  ('5604', '223', '1'),
  ('5605', '224', '1'),
  ('5606', '174', '1'),
  ('5607', '235', '1'),
  ('5608', '236', '1'),
  ('5609', '237', '1'),
  ('5610', '184', '1'),
  ('5611', '188', '1'),
  ('5612', '189', '1'),
  ('5613', '190', '1'),
  ('5614', '227', '1'),
  ('5615', '228', '1'),
  ('5616', '185', '1'),
  ('5617', '191', '1'),
  ('5618', '192', '1'),
  ('5619', '193', '1'),
  ('5620', '229', '1'),
  ('5621', '230', '1'),
  ('5622', '186', '1'),
  ('5623', '194', '1'),
  ('5624', '195', '1'),
  ('5625', '196', '1'),
  ('5626', '231', '1'),
  ('5627', '232', '1'),
  ('5628', '187', '1'),
  ('5629', '197', '1'),
  ('5630', '198', '1'),
  ('5631', '199', '1'),
  ('5632', '233', '1'),
  ('5633', '200', '1'),
  ('5634', '201', '1'),
  ('5635', '202', '1'),
  ('5636', '203', '1'),
  ('5637', '234', '1'),
  ('5638', '204', '1'),
  ('5639', '205', '1'),
  ('5640', '211', '1'),
  ('5641', '212', '1'),
  ('5642', '213', '1'),
  ('5643', '214', '1'),
  ('5644', '206', '1'),
  ('5645', '215', '1'),
  ('5646', '216', '1'),
  ('5647', '217', '1'),
  ('5648', '218', '1'),
  ('5649', '207', '1'),
  ('5650', '219', '1'),
  ('5651', '220', '1'),
  ('5652', '221', '1'),
  ('5653', '222', '1'),
  ('5654', '175', '6'),
  ('5655', '172', '6'),
  ('5656', '176', '6'),
  ('5657', '177', '6'),
  ('5658', '178', '6'),
  ('5659', '225', '6'),
  ('5660', '226', '6'),
  ('5661', '173', '6'),
  ('5662', '179', '6'),
  ('5663', '180', '6'),
  ('5664', '181', '6'),
  ('5665', '223', '6'),
  ('5666', '224', '6'),
  ('5667', '174', '6'),
  ('5668', '235', '6'),
  ('5669', '236', '6'),
  ('5670', '237', '6'),
  ('5671', '184', '6'),
  ('5672', '188', '6'),
  ('5673', '189', '6'),
  ('5674', '190', '6'),
  ('5675', '227', '6'),
  ('5676', '228', '6'),
  ('5677', '185', '6'),
  ('5678', '191', '6'),
  ('5679', '192', '6'),
  ('5680', '193', '6'),
  ('5681', '229', '6'),
  ('5682', '230', '6'),
  ('5683', '186', '6'),
  ('5684', '194', '6'),
  ('5685', '195', '6'),
  ('5686', '196', '6'),
  ('5687', '231', '6'),
  ('5688', '232', '6'),
  ('5689', '187', '6'),
  ('5690', '197', '6'),
  ('5691', '198', '6'),
  ('5692', '199', '6'),
  ('5693', '233', '6'),
  ('5694', '200', '6'),
  ('5695', '201', '6'),
  ('5696', '202', '6'),
  ('5697', '203', '6'),
  ('5698', '234', '6'),
  ('5699', '204', '6'),
  ('5700', '205', '6'),
  ('5701', '211', '6'),
  ('5702', '212', '6'),
  ('5703', '213', '6'),
  ('5704', '214', '6'),
  ('5705', '206', '6'),
  ('5706', '215', '6'),
  ('5707', '216', '6'),
  ('5708', '217', '6'),
  ('5709', '218', '6'),
  ('5710', '207', '6'),
  ('5711', '219', '6'),
  ('5712', '220', '6'),
  ('5713', '221', '6'),
  ('5714', '222', '6'),
  ('5715', '175', '7'),
  ('5716', '172', '7'),
  ('5717', '176', '7'),
  ('5718', '177', '7'),
  ('5719', '178', '7'),
  ('5720', '225', '7'),
  ('5721', '226', '7'),
  ('5722', '173', '7'),
  ('5723', '179', '7'),
  ('5724', '180', '7'),
  ('5725', '181', '7'),
  ('5726', '223', '7'),
  ('5727', '224', '7'),
  ('5728', '174', '7'),
  ('5729', '235', '7'),
  ('5730', '236', '7'),
  ('5731', '237', '7'),
  ('5732', '184', '7'),
  ('5733', '188', '7'),
  ('5734', '189', '7'),
  ('5735', '190', '7'),
  ('5736', '227', '7'),
  ('5737', '228', '7'),
  ('5738', '185', '7'),
  ('5739', '191', '7'),
  ('5740', '192', '7'),
  ('5741', '193', '7'),
  ('5742', '229', '7'),
  ('5743', '230', '7'),
  ('5744', '186', '7'),
  ('5745', '194', '7'),
  ('5746', '195', '7'),
  ('5747', '196', '7'),
  ('5748', '231', '7'),
  ('5749', '232', '7'),
  ('5750', '187', '7'),
  ('5751', '197', '7'),
  ('5752', '198', '7'),
  ('5753', '199', '7'),
  ('5754', '233', '7'),
  ('5755', '200', '7'),
  ('5756', '201', '7'),
  ('5757', '202', '7'),
  ('5758', '203', '7'),
  ('5759', '234', '7'),
  ('5760', '204', '7'),
  ('5761', '205', '7'),
  ('5762', '211', '7'),
  ('5763', '212', '7'),
  ('5764', '213', '7'),
  ('5765', '214', '7'),
  ('5766', '206', '7'),
  ('5767', '215', '7'),
  ('5768', '216', '7'),
  ('5769', '217', '7'),
  ('5770', '218', '7'),
  ('5771', '207', '7'),
  ('5772', '219', '7'),
  ('5773', '220', '7'),
  ('5774', '221', '7'),
  ('5775', '222', '7');





-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `num` int(11) DEFAULT NULL COMMENT '序号',
  `pid` int(11) DEFAULT NULL COMMENT '父角色id',
  `name` varchar(255) DEFAULT NULL COMMENT '角色名称',
  `deptid` int(11) DEFAULT NULL COMMENT '部门名称',
  `tips` varchar(255) DEFAULT NULL COMMENT '提示',
  `version` int(11) DEFAULT NULL COMMENT '保留字段(暂时没用）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='角色表';

-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES ('1', '1', '0', '超级管理员', '24', 'administrator', '1'),
  ('5', '2', '0', '查看员', '1', 'observer', null),
  ('6', '100', '0', '销售员', '4', 'salesman', null),
  ('7', '101', '0', '销售经理', '4', 'salesManager', null);

-- ----------------------------
--  Table structure for `sys_user`
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `avatar` varchar(255) DEFAULT NULL COMMENT '头像',
  `account` varchar(45) DEFAULT NULL COMMENT '账号',
  `password` varchar(45) DEFAULT NULL COMMENT '密码',
  `salt` varchar(45) DEFAULT NULL COMMENT 'md5密码盐',
  `name` varchar(45) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '名字',
  `birthday` datetime DEFAULT NULL COMMENT '生日',
  `sex` int(11) DEFAULT NULL COMMENT '性别（1：男 2：女）',
  `email` varchar(45) DEFAULT NULL COMMENT '电子邮件',
  `phone` varchar(45) DEFAULT NULL COMMENT '电话',
  `roleid` varchar(255) DEFAULT NULL COMMENT '角色id',
  `deptid` int(11) DEFAULT NULL COMMENT '部门id',
  `status` int(11) DEFAULT NULL COMMENT '状态(1：启用  2：冻结  3：删除）',
  `createtime` datetime DEFAULT NULL COMMENT '创建时间',
  `version` int(11) DEFAULT NULL COMMENT '保留字段',
  `wxUserId` varchar(255) DEFAULT null ,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COMMENT='管理员表';

-- ----------------------------
--  Records of `sys_user`
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES ('1', 'girl.gif', 'admin', 'ecfadcde9305f8891bcfe5a1e28c253e', '8pgby', '张三', '2017-05-05 00:00:00', '2', 'sn93@qq.com', '18200000000', '1', '27', '1', '2016-01-29 08:49:53', '25', '');
COMMIT;


